<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
    <div id='app'>
        {{msg}}

        <brother>

            <template v-slot:header>
                22222 <p>222222</p>
            </template>

            <template>
                    <p>3333</p>
                    <p>3333</p>
                </template>
            <template v-slot:footer >
                <p>底部</p>
            </template>    
        </brother>

    </div>
    <script type='text/javascript'>

        var brother = {
            data() {
                return {
                    header: "这是一个son组件1111",
                    bb: "我是哥哥",
                    
                }
            },
            mrthods: {},
            template: `<div>
                这是一个brother组件=====
                <header>
                        <slot  name="header"></slot>
                </header>



               <main >
                    <slot ></slot>
               </main>
                

                <footer>
                        <slot  name="footer"></slot>
                </footer>
                
            </div>`,

        };
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue'
            },
            components: {
                brother
            }
        });
    </script>
</body>

</html>